<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>管理系统Login</title>

<!-- Font Awesome -->
<link rel="stylesheet" th:href="@{/admin/plugins/fontawesome-free/css/all.min.css}">
<!-- icheck bootstrap -->
<link rel="stylesheet" th:href="@{/admin/plugins/icheck-bootstrap/icheck-bootstrap.min.css}">
<!-- Theme style -->
<link rel="stylesheet" th:href="@{/admin/dist/css/adminlte.min.css}">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="#"><b>管理系统登录</b></a>
    </div>
    <!-- /.login-logo -->
    <div class="card">
        <div class="card-body login-card-body">
            <p class="login-box-msg">Sign in to start your session</p>

            <form th:action="@{/admin/login}" method="post">

                <div th:if="${not #strings.isEmpty(session.errorMsg)}" class="form-group">
                    <div class="alert alert-danger" th:text="${session.errorMsg}"></div>
                </div>

                <div class="input-group mb-3">
                    <input type="text" class="form-control" placeholder="Account/User" name="loginUserName">
                    <div class="input-group-append">
                        <div class="input-group-text">
                            <span class="fas fa-envelope"></span>
                        </div>
                    </div>
                </div>

                <div class="input-group mb-3">
                    <input type="password" class="form-control" placeholder="Password" name="loginPassword">
                    <div class="input-group-append">
                        <div class="input-group-text">
                            <span class="fas fa-lock"></span>
                        </div>
                    </div>
                </div>

                <div class="row mb-3">
                    <div class="col-6">
                        <input type="text" class="form-control" name="verifyCode" placeholder="Please enter a verification code" required="true">
                    </div>
                    <div class="col-6">
                        <img alt="单击图片刷新！" class="pointer" th:src="@{/common/kaptcha}"
                             onclick="this.src='/common/kaptcha?d='+new Date()*1">
                    </div>
                </div>

                <div class="row col-auto mb-3">
                    <button type="submit" class="btn btn-primary btn-block">Sign In</button>
                </div>
            </form>

            <p class="mb-1">
                <a href="#">I forgot my password</a>
            </p>
        </div>
        <!-- /.login-card-body -->
    </div>
</div>
<!-- /.login-box -->

<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/admin/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/admin/dist/js/adminlte.min.js}"></script>

</body>
</html>
